#ifndef PICCOLO_GLFW_WINDOW_H
#define PICCOLO_GLFW_WINDOW_H

#include "PiccoloWindow.h"
#include "GLFW/glfw3.h"

namespace Piccolo
{
    class PiccoloGLFWWindow : public PiccoloWindow
    {
    public:
        PiccoloGLFWWindow() = delete;
        PiccoloGLFWWindow(uint32_t width, uint32_t height, const char* title);
        ~PiccoloGLFWWindow() override;

        bool ShouldClose() override;
        void PollEvents() override;
        void SwapBuffer() override;

        void *GetImplWindowPointer() const override { return mGLFWWindow; }
        void GetMousePos(glm::vec2 &mousePos) const override;
        bool IsMouseDown(EMouseButton mouseButton) const override;
        bool IsMouseUp(EMouseButton mouseButton) const override;
        bool IsKeyDown(EKey key) const override;
        bool IsKeyUp(EKey key) const override;

    private:
        void SetupWindowCallbacks();

        GLFWwindow* mGLFWWindow;
    };
}

#endif